package com.sds.shop.action;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.sds.fw.mvc.Action;
import com.sds.shop.dao.JoinDAO;
import com.sds.shop.vo.MemVO;


public class JoinAction extends Action {

	@Override
	public void execute(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
		
						 
		request.setCharacterEncoding("euc-KR");
		
		JoinDAO dao = new JoinDAO();		
		
		MemVO mvo = new MemVO();
		
		mvo.setMemId(request.getParameter("MemId"));
		mvo.setMemNm(request.getParameter("MemNm"));
		mvo.setMemCd(request.getParameter("MemCd"));
		mvo.setPwd(request.getParameter("Pwd"));
		mvo.setPwdHint(request.getParameter("PwdHint"));
		mvo.setPwdHintAns(request.getParameter("PwdHintAns"));
		mvo.setSsn(request.getParameter("Ssn"));
		mvo.setBirthDt(request.getParameter("BirthDt"));
		mvo.setMaleFlg(request.getParameter("MaleFlg"));
		mvo.setTelNo(request.getParameter("TelNo"));
		mvo.setCellNo(request.getParameter("CellNo"));
		mvo.setAddr(request.getParameter("Addr"));
		mvo.setEmail(request.getParameter("Email"));
		mvo.setEmailRcvFlg(request.getParameter("EmailRcvFlg"));
		//mvo.setMemRegDtm(request.getParameter("MemRegDtm"));
		
		System.out.println("JoinAction");
		
		dao.insertMember(mvo);
		
		
		
		//HttpUtil.redirect(response, "list.do");
	}

}
